package com.framework.workflow.service;


import com.framework.workflow.model.WfProcessInstance;

/**
 * @author zzg
 */
public interface IProcessInstanceService {
    /**
     * 获取流程和业务关联的流程实例
     * @param id 唯一标识
     * @return
     */
    WfProcessInstance findById(String id);

    /**
     * 保存
     * @param instance
     */
    void save(WfProcessInstance instance);

    /**
     * 获取流程和业务关联的流程实例
     * @param processInstanceId
     * @return
     */
    WfProcessInstance findByProcInsId(String processInstanceId);

    /**
     * 获取流程和业务关联的流程实例
     * @param id
     * @return
     */
    WfProcessInstance findByBusinessId(String id);

}
